Release 10.1A: OpenEdge Development:
ProDataSets


Defining a query on a child table

As the FILL method has been described so far, Progress fills child tables based on the Data-Relation between the child and its parent. Normally, you define a query for each top-level parent table. But you can also define a query for a child table of a Data-Relation. In this case, Progress ignores the fields in the Data-Relation and executes the query on the child table. Depending on what the selection criteria in the query are, this can result in records in the child table that are not related to a parent. No error results in this case. Such records simply won’t be found by the default traversal of parent and child that uses the Data-Relation, and must be located in some other way with code in the procedure using the ProDataSet.

In order to facilitate defining a query for a child table that references its parent (but which presumably does additional selection beyond what Progress would do by default), the query syntax for these queries within ProDataSets has been extended to permit the query definition to reference a field in the parent table directly. The child query needs to be prepared only once, and Progress substitutes the proper value for the current parent record each time the FILL proceeds from parent to child.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095